

package top.continew.admin.question.config;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class QuestionEventSender {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendEvent(QuestionEvent event) {
        rabbitTemplate.convertAndSend(MQConfig.EXCHANGE, MQConfig.ROUTING_KEY, event);
    }
}